package com.zgkxzx.设计模式.工厂方法;

/**
 * 创建者   zgkxzx
 * 创建日期 2018/5/11.
 * 功能描述
 */
public class PazzaStore {
    SimplePazzaFactory simplePazzaFactory;

    public PazzaStore(SimplePazzaFactory simplePazzaFactory) {
        this.simplePazzaFactory = simplePazzaFactory;
    }


    public void order(String name) {
        IPazza pazza = simplePazzaFactory.createPazza(name);
        pazza.bake();
        pazza.prepare();
        pazza.cut();
        pazza.box();
    }
}
